import java.util.Scanner;

public class demo5 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        try {
            System.out.println("请输入（1-3）之间的数字：");
            int num=input.nextInt();
            switch (num){
                case 1:
                    System.out.println("数学");
                    break;
                case 2:
                    System.out.println("语文");
                    break;
                case 3:
                    System.out.println("化学");
                    break;
                default:
                    throw new RuntimeException("您输入错误");
            }
        }catch (Exception ex){
            System.out.println("输入错误");
            ex.printStackTrace();
        }finally {
            System.out.println("欢迎提出建议！");
        }

}}
